package com.huilian.iotbox.data.service;

import com.huilian.iotbox.data.dto.MemberStoreBalanceDto;
import com.huilian.iotbox.data.po.MemberStoreBalance;
import com.huilian.iotbox.data.po.Order;
import com.huilian.iotbox.data.vo.MemberStoreBalanceVo;

import java.math.BigDecimal;
import java.util.List;

public interface MemberStoreBalanceCommonService {

    MemberStoreBalanceVo findBalance(MemberStoreBalanceDto memberStoreBalanceDto);

    void updateOrderRecord(Order order);

    int add(Long id, Integer merchantStoreId, Integer userId, String registerDeviceNo);

    MemberStoreBalanceVo findOneMemberStoreBalanceById(Long memberStoreBalanceId);

    MemberStoreBalance addOrReduceMemberStoreBalanceBeforeCheckParam(int rechargeNum, int donateNum, long memberStoreBalanceId, long memberId, int userId, int merchantStoreId);

    int addMemberStoreBalance(int runCount, int rechargeNum, int donateNum, long memberStoreBalanceId, long memberId, int userId, int merchantStoreId);

    int reduceMemberStoreBalance(int runCount, int rechargeNum, int donateNum, Long memberStoreBalanceId, Long memberId, Integer userId, Integer merchantStoreId);

    int addMemberStoreMoneyBalance(int i, MemberStoreBalance memberStoreBalance);

    int reduceMemberStoreMoneyBalance(int runCount, MemberStoreBalance memberStoreBalance);

    MemberStoreBalance addOrReduceMemberStoreMoneyBalanceBeforeCheckParam(BigDecimal moneyRechargeBalance, BigDecimal moneyDonateBalance, long memberStoreBalanceId, long memberId, int userId, int merchantStoreId);

    List<MemberStoreBalance> findAllByMemberId(Long memberId);

    int addMemberStoreIntegralBalance(int count, Integer integral, long memberStoreBalanceId, long memberId, Integer userId, Integer merchantStoreId);

    int addMemberStoreLotteryBalance(int i, Integer lottery, long memberStoreBalanceId, long memberId, Integer userId, Integer merchantStoreId);

    int updateTotalPayById(MemberStoreBalance updateMemberStoreBalance);

    MemberStoreBalanceVo findMemberStoreBalanceByMerchantStoreId(MemberStoreBalanceDto memberStoreBalanceDto);

    MemberStoreBalanceVo queryMemberStoreBalance(Integer merchantStoreId, Long memberId);

    MemberStoreBalanceDto addBalance(int runCount, MemberStoreBalanceDto memberStoreBalanceDto) throws Exception;
}
